

import java.awt.BorderLayout;
import java.awt.Font;

import javax.swing.JLabel;
import javax.swing.JPanel;

import fr.uhp.nobrain.tools.Observateur;


public class GameViewMock {

	private JLabel question = new JLabel("Give the correct answer");
	private JLabel problem = new JLabel("1 + 1 = ?");
	private JPanel panel;
	private GameStateMock control;
	
	public GameViewMock(GameStateMock control) {
		this.panel = new JPanel();
		this.control = control;
		
		this.control.addObservateur(new Observateur(){
			public void update(String o) {
				problem.setText(o);
			}
		});

		Font qPolice = new Font("DS-digital", Font.TYPE1_FONT, 15);
		Font pPolice = new Font("DS-digital", Font.TYPE1_FONT, 20);
		this.question.setFont(qPolice); this.problem.setFont(pPolice);
		this.panel.setLayout(new BorderLayout());
		this.panel.add(question, BorderLayout.NORTH); this.panel.add(problem,BorderLayout.CENTER);
	}
	
	public JPanel getPanel() {
		return panel;
	}
}
